package com.czzapp.xiaoyumemo.test;

import com.czzapp.xiaoyumemo.service.StartupService;
import com.czzapp.xiaoyumemo.view.XiaoyuMemoActivity;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;

public class StartTestActivity extends Activity {
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		Intent service = new Intent();
		service.setClass(this, StartupService.class);
		startService(service);
		Thread thread = new Thread(new Runnable() {
			
			@Override
			public void run() {
				try {
					Thread.sleep(2000);
				} catch (InterruptedException e) {
					e.printStackTrace();
				}
				Intent activity = new Intent();
				activity.setClass(StartTestActivity.this, XiaoyuMemoActivity.class);
				startActivity(activity);
			}
		});
		thread.start();
	}
}
